/************************************************************
 * Copyright (C), 2022-2030, ripnano. Co., Ltd.
 * FileName:        form_name_dlg.h
 * Author:          Dan Yin
 * Date:            2023-12-27
 * Description:     Program naming
 * Version:         1.0.0.0
 **********************************************************/

#ifndef FORM_NAME_DLG_H
#define FORM_NAME_DLG_H

// add necessary includes here
#include "ui/defines/global.h"


namespace Ui {
class FormNameDlg;
}

class FormNameDlg : public QWidget
{
    Q_OBJECT

public:
    // Get an instance of "FormNameDlg" class, if exist, return it
    static FormNameDlg* getInstance(QWidget *pParent = nullptr);

    // Set procedure name and display the page
    void displayWindow(int nReplyType, QString sContent, QString sContentEx = "");

protected:
    // Triggers an event before it is switch language
    void changeEvent(QEvent *event);

signals:
    // Confirm to do it
    void signalReplayInfo(int nReplyType, bool bAccepted = true, QString sContent = "");

private slots:
    // Save the basic info after click the button
    void on_pushButton_Confirm_clicked();

    // Close the window after click the button
    void on_pushButton_Cancel_clicked();

private:
    // The default constructor
    explicit FormNameDlg(QWidget *parent = nullptr);

    // The default destructor
    virtual ~FormNameDlg();

    // After constructing object, initialize the object
    void _initObj();

    // Init the window style
    void _InitUi();

private:
    Ui::FormNameDlg *ui;

    bool    m_bSaveAs = false;
};

#endif // FORM_NAME_DLG_H
